﻿using System.IO;
using System.Linq;
namespace NodeEditor
{
    public sealed class FileUtility
    {
        public static string GetFilePath(string path)
        {
            var extension = Path.GetExtension(path);
            var files = Directory.GetFiles("Assets", $"*{extension}", SearchOption.AllDirectories);
            var result = files.Where(x => x.IndexOf(path) != -1).FirstOrDefault();
            return result;
        }
    }

}